Using text layers
Text layer is used for displaying the text as a 2D overlay. For example, use a text layer to show text in a head-up display.
Note that in order to properly render text you have to use a font that supports the languages you want to include in your Kanzi application.
Adding text with a text layer
To add text with a text layer:
- In the Project right-click the object to which you want to add the Text Layer and select Create > Text Layer.
- In the Properties in the Text property add the text you want to display. To add a new line press Shift+Enter.
- In the Font property select the font you want to use. See Importing fonts.
- Set the Font Size property to change the size of the displayed text.
-
(Optional) Enable the Complex Script Support property if you want to:
- Show text in languages that write right-to-left.
- Use line breaks according to the Unicode line breaking algorithm.
- Use ligatures.
Changing the text in a text layer with native code
You can change the text shown by a text layer in C application of your Kanzi application by changing the Text property with kzuObjectNodeSetStringProperty(textLayer, KZU_PROPERTY_TYPE_TEXT_LAYER__TEXT, "Enter your text here.").
See also
Importing fonts
Using text blocks
Internationalization
Size of the glyph cache texture
Open topic with navigation